/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.fee.mapper;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.fee.entity.Payable;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 应付结算单MAPPER接口
 * @author weisong
 * @version 2017-09-18
 */
@MyBatisMapper
public interface PayableMapper extends BaseMapper<Payable> {
    //更新开票金额
    public int modifyInvoiceMoneyById(Double invoiceMoney, String id);

    //更新开票金额和状态
    public int updateMoneyAndStatusById(@Param("status") Integer status, @Param("invoiceMoney") Double invoiceMoney,
                                        @Param("vcaMoney") Double vcaMoney, @Param("noInvoiceMoney") Double noInvoiceMoney, @Param("noVcaMoney") Double noVcaMoney, @Param("id") String id);

    //查询最大的单号和日期【用来生成单号】
    public Payable findClearingNoBusyDate();

    //根据付款单子表id查询对应的应付结算单-
    public Payable findByPamentDetailId(@Param(value = "id") String id);

    //付款单引入已确认的数据
    public List<Payable> findAllByStatus(@Param(value = "payee") String payee, @Param(value = "status") Integer status);
}